Track with a weak ref the trash row, so we can clean up the data in the
private struct.
Spotted and reviewed by Christian Hergert.
_("Trash"), icon, mount_uri,
NULL, NULL, NULL, 0,
_("Open the trash"));
+ g_object_add_weak_pointer (G_OBJECT (sidebar->trash_row), &sidebar->trash_row);
g_object_unref (icon);
}
g_clear_object (&sidebar->trash_monitor);
}
+ if (sidebar->trash_row)
+ {
+ g_object_remove_weak_pointer (G_OBJECT (sidebar->trash_row), &sidebar->trash_row);
+ sidebar->trash_row = NULL;
+ }
+
if (sidebar->volume_monitor != NULL)
{
g_signal_handlers_disconnect_by_func (sidebar->volume_monitor,